#ifndef AUTOUPDATA_H
#define AUTOUPDATA_H

#include <QWidget>
#include <QDir>
#include <QFileInfo>
#include <QProcess>
#include <QDebug>
#include <QTimer>

namespace Ui {
class autoUpdata;
}

class autoUpdata : public QWidget
{
    Q_OBJECT

public:
    explicit autoUpdata(QWidget *parent = 0);
    ~autoUpdata();
    void disConnectDisk();
    void setUpdatePath(QString path);
    void rebootSys();

private slots:
    void on_pushButton_updata_clicked();

    void on_pushButton_exit_clicked();
    void psFinished(int);
    void readCmdInformation();
    void displayUdiskFileList();
    void reboot();
    void progress(QString str);


signals:
    void copyFile();



protected:
    void keyPressEvent(QKeyEvent *);

private:
    Ui::autoUpdata *ui;
    QProcess *my_process;
    QTimer *my_timer;
    bool my_updataEnable;
    QString my_upstr ;
    bool my_udiskEnable;
};

#endif // AUTOUPDATA_H
